#ifndef WELCOMEWINDOW_H
#define WELCOMEWINDOW_H

#include <QWidget>
#include <QPushButton>
#include <QVBoxLayout>
#include <QLabel>
#include <QComboBox>//难度选择
#include<recordsmanager.h>

class WelcomeWindow : public QWidget
{
    Q_OBJECT
public:
    explicit WelcomeWindow(RecordsManager *recordsManager, QWidget *parent = nullptr);


public slots:
    void updateBestTimeDisplay(int difficulty);

signals:
    void startClicked(QRect windowGeometry, int difficulty);  // 添加几何参数和难度;
    void showWelcome();
    void difficultyChanged(int newDifficulty);

private:
    QPushButton *clearButton; // 添加清除按钮
    RecordsManager *m_recordsManager;
    QLabel *m_bestTimeLabels[3]; // 对应3个难度
    QPushButton *startButton;
    QLabel *titleLabel;
    QComboBox *difficultyComboBox;//难度
};

#endif // WELCOMEWINDOW_H
